'use strict';

stareal
    .controller("ViewCaolistController", function ($scope, $stateParams, $api, $state, $alert, localStorageService,$interval,$window,$lazyLoader,$timeout) {
         //草稿列表  app/view/caorelist
        $scope.viewcaoLists = new $lazyLoader("app/view/caorelist",{status:-1,flag:1},true);
        $scope.viewdelete=function(id){
            $api.post("app/view/delete",{viewid:id},true)
                .then(function (ret) {
                    if(ret.retCode==0){
                        $alert.show('删除成功！');
                        $timeout(location.reload(),2000);
                       // location.reload();
                    }
                })
        }
    });